<?php
$this->load->view($this->template->tpl_prefix_admin . 'youtube/header');
?>
<form method="post" action="<?php echo $this->url_index.'/adduser/' . @$editID; ?>"  enctype="multipart/form-data">
 <div class="subcont">
	<ul class="details span8">
		 <li><?php echo $this->atheme->group_input2('edit[YOUT_TITLE]', 'Tên gợi nhớ', '', 'required span9', @$edit->YOUT_TITLE, 'text', ''); ?>
		 </li>
		 <li><?php echo $this->atheme->group_input2('edit[YOUT_LINK]', 'UserName', '', 'required span9', @$edit->YOUT_LINK, 'text', ''); ?>
		 </li>
		
		<li>
		   <?php echo $this->atheme->group_select2('edit[YOUT_STATUS]', 'Trạng thái', '', 'required ',array('1'=>'Hiện','0'=>'Ẩn'), @$edit->YOUT_STATUS, ''); ?>
		</li>
	</ul>
	
	<ul class="span8">
	   <input type="submit" name="send" class="btn btn-primary" value="<?php
if(@$editID > 0)
{
	echo 'Lưu';
	
}
else {
	echo 'Thêm mới';
}
?>"/>
	</ul>
	<br clear="both">

</div>
</form>
<?php
$header = array('ID', 'User name','Link','Trạng thái','Views');
$config = array(
    'header_icon' => 'icon-list',
    'header_title' => 'Quản lý '.@$tresource->RES_NAME,
    'ID' => '0',
    'showEdit' => false,
    'showDelete' => false,
);
if ($this->permission->check("delete", $this->resCode))
    $config['showDelete'] = true;

if ($this->permission->check("update", $this->resCode))
    $config['showEdit'] = true;

$data = array();
//Các project tham gia
$stt = 0;
foreach ($datas as $result) {

    $data[] = array($result->YOUT_ID,$result->YOUT_ID, $result->YOUT_TITLE,  $result->YOUT_LINK, ($result->YOUT_STATUS == 1)?'Hiện':'Ẩn','<a href="'.$this->url_index.'/addplaylist/'.$result->YOUT_ID.'" class="btn">Views Playlist</a>');
}

echo $this->atheme->table_simple($header, $data, $config);
?>

